<?php namespace addons\links\model;

use houdunwang\model\Model;

class Links extends Model
{

	//数据表
	protected $table = "addons_links";

	//允许填充字段
	protected $allowFill = ['*'];

	//禁止填充字段
	protected $denyFill = [];

	//自动验证
	protected $validate = [//['字段名','验证方法','提示信息',验证条件,验证时间]
		['links_name','required','请输入友链名称',self::MUST_VALIDATE,self::MODEL_BOTH],
		['links_url','required','请输入友链链接',self::MUST_VALIDATE,self::MODEL_BOTH],
		['links_orderby','required','请输入友链排序',self::MUST_VALIDATE,self::MODEL_BOTH],
	];

	//自动完成
	protected $auto = [//['字段名','处理方法','方法类型',验证条件,验证时机]
	];

	//自动过滤
	protected $filter = [//[表单字段名,过滤条件,处理时间]
	];

	//时间操作,需要表中存在created_at,updated_at字段
	protected $timestamps = true;
}